package com.topofstack.flp;

import com.topofstack.flp.managers.FLPAssetManager;
import com.topofstack.flp.managers.FLPPreferenceManager;

import android.app.AlertDialog;
import android.app.Application;
import android.content.Context;
import android.content.DialogInterface;


public class FLPApplication extends Application {
	
	FLPPreferenceManager preferenceManager;
	FLPAssetManager assetManager;
	
	public FLPApplication(){
		super();
	}

	public void onCreate(){
		preferenceManager = new FLPPreferenceManager(this);
		assetManager = new FLPAssetManager(this);		
	}
	
	public FLPPreferenceManager getPreferenceManager(){
		return preferenceManager;
	}
	
	public FLPAssetManager getAssetManager(){
		return assetManager;
	}
	
	public static void showAlert(Context ctx, String message, String title){
		new AlertDialog.Builder(ctx)
	    .setTitle(title)
	    .setMessage(message)
	    .setPositiveButton("OK", new DialogInterface.OnClickListener() {
	        public void onClick(DialogInterface dialog, int which) { 
	            // continue with delete
	        }
	     })
	    /*.setNegativeButton("No", new DialogInterface.OnClickListener() {
	        public void onClick(DialogInterface dialog, int which) { 
	            // do nothing
	        }
	     })*/
	     .show();
	}
	

}
